home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / recovery-mode / options / dpkg < prev    next >
Text File  |  2009-10-23  |  845b  |  37 lines

  1. #!/bin/sh
  2.  
  3. . /usr/share/recovery-mode/l10n.sh
  4.  
  5. if [ "$1" = "test" ]; then
  6.   echo $(eval_gettext "Repair broken packages")
  7.   exit 0
  8. fi
  9.  
  10. # do some cleanup
  11. rm /var/lib/apt/lists/partial/*
  12. rm /var/cache/apt/archives/partial/*
  13.  
  14. # check and use dist-upgraders partial mode if we have it,
  15. # it contains a lot of useful repair code
  16. for v in 2.5 2.6; do
  17.   python="/usr/bin/python$v"
  18.   script="/usr/lib/python$v/site-packages/DistUpgrade/dist-upgrade.py"
  19.   if [ -x "$python" ] && [ -e "$script" ]; then
  20.     "$python" "$script" --partial --frontend DistUpgradeViewText \
  21.       --datadir /usr/share/update-manager/
  22.     break
  23.   fi
  24. done
  25.  
  26. # now run the apt foo again (if u-m was ok that shouldn't be needed
  27. dpkg --configure -a
  28. apt-get update
  29. apt-get install -f
  30. apt-get dist-upgrade
  31.  
  32. echo ""
  33. echo $(eval_gettext "Finished, please press ENTER")
  34. read TMP
  35.  
  36. exit 0
  37.